#ifndef CIGUI_PROPERTYGROUP_H
#define CIGUI_PROPERTYGROUP_H

#include <QtGui>

#include "Gui_GLOBAL.h"
#include "../Operations/ActionOpCreation.h"

namespace CIGui {
    /**
     * This class represents  a gruop box to contain widgets for the properties of the operations
     **/
    class PropertyGroup : public QGroupBox {

        Q_OBJECT    
            
    public:
        PropertyGroup (CIOps::ActionOpCreation* act, QString n, QWidget* parent = 0);                                //Constructor
        virtual ~PropertyGroup();                                                       //Destructor

        //CONSTANTS DECLARATION        
        static const QString STYLE_SHEET;

        void Add_X_Y_Z_Properties (QString& default_value);
        void AddReferencePointProperties();
        void AddCreationProperties (QString default_stacks, QString default_slices);
        void AddIgnoreBackfacesProperty();
        void AddThicknessProperty (QString default_thickness);

    public slots:
        void SetAllProperties (bool);                    //Slot method to retrieve and set the values of the properties of the current operation

        void SetX (const QString& x);
        void SetY (const QString& y);
        void SetZ (const QString& z);

        void SetCenterOfMass (bool centerOfMass);
        void SetOrigin (bool origin);
        void SetUserPoint (bool userPoint);

        void SetStacks (const QString& x);
        void SetSlices (const QString& x);

        void SetIgnoreBackfaces (bool b);

        void SetThickness (const QString& x);

        void SendOperationRequest();

    signals:
        void OperationRequest (int);
        void PropertyChanged();

    protected:   
        QString name;
        CIOps::ActionOpCreation* operationAction;
    };
}

#endif /* CIGUI_PROPERTYGROUP_H */
